﻿using Appliaction.Dto.Inv;
using Domain.Entitys.Inv;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Appliaction.IAppServices.Inv
{
    /// <summary>
    /// 库存抽检接口
    /// </summary>
    public interface IInv_SampServices
    {
        /// <summary>
        /// 仓库盘点查询
        /// </summary>
        /// <param name="qty_code"></param>
        /// <param name="qty_type"></param>
        /// <param name="currentPage"></param>
        /// <param name="pageSize"></param>
        /// <returns></returns>
        List<Samp_SelectDto> Inv_Samp_selectFY(string Samp_code, string Samp_type, int currentPage, int pageSize);

        /// <summary>
        /// 仓库盘点列表查询
        /// </summary>
        /// <param name="trf_code"></param>
        /// <param name="trf_type"></param>
        /// <returns></returns>
        Task<int> Inv_Samp_selectCount(string Samp_code, string Samp_type);
       
        /// <summary>
        /// 根据编号查询仓库盘点
        /// </summary>
        /// <param name="trf_code"></param>
        /// <returns></returns>
        Task<List<Inv_samp>> Inv_Qty_SelectCode(string Samp_code);


        /// <summary>
        /// 根据编码查询仓库盘点详情信息
        /// </summary>
        /// <param name="trf_code"></param>
        /// <returns></returns>
        Task<List<Inv_prodInfo>> Inv_Qty_SelectDetail(string Samp_code);



        /// <summary>
        /// 删除抽检单
        /// </summary>
        /// <param name="Samp_code"></param>
        /// <returns></returns>
        Task<int> Inv_Qty_Delete(int Samp_id);

        /// <summary>
        ///修改审核状态
        /// </summary>
        /// <param name="inv_samp"></param>
        /// <returns></returns>
        Task<int> Inv_samp_audit_statusUpdate(Inv_SampUpdateDto inv_SampUpdateDto);

        /// <summary>
        /// 添加抽检单
        /// </summary>
        /// <param name="inv_samp"></param>
        /// <returns></returns>
        Task<int> Inv_Samp_Insert(Inv_SampAddDto inv_SampAddDto);

        /// <summary>
        /// 添加详情单
        /// </summary>
        /// <param name="inv_prodInfo"></param>
        /// <returns></returns>
        Task<int> Inv_prodInfo_Insert(List<Inv_ProdInfoAddDto>  inv_ProdInfoAddDtos);

        /// <summary>
        /// 根据编号查询Id
        /// </summary>
        /// <param name="Samp_code"></param>
        /// <returns></returns>
        Task<int> Inv_sampt_selectId(string Samp_code);

        /// <summary>
        /// 修改抽检单和抽检详情单
        /// </summary>
        /// <param name="inv_Samp"></param>
        /// <param name="inv_prodInfo"></param>
        /// <returns></returns>
        Task<int> Inv_Smap_Update(Inv_SampUpdateMerage inv_SampUpdateMerage);


        /// <summary>
        /// 查询抽检单--出库单--查询
        /// </summary>
        /// <param name="code"></param>
        /// <param name="currentPage"></param>
        /// <param name="pageSize"></param>
        /// <returns></returns>
        List<Inv_samp> Inv_Select_SampSelect(string code, int currentPage, int pageSize);

        /// <summary>
        /// 查询抽检单--出库单--查询
        /// </summary>
        /// <returns></returns>
        Task<int> Inv_Select_SmapSelect_Count(string code);

        /// <summary>
        /// 查询抽检单--出库单--查询详情
        /// </summary>
        /// <param name="code"></param>
        /// <returns></returns>
        List<Inv_prodInfo> Inv_Select_Inv_prodInfo(string code);


        /// <summary>
        /// 出库完成之后,审核完毕--修改抽检单的字段
        /// </summary>
        /// <returns></returns>
        Task<int> Inv_Samp_Outbound_update(int id);
    }
}
